import requests
from fake_useragent import UserAgent



#useragent

# url = "http://127.0.0.1:8000/"
# ua = UserAgent()
# print(ua.random)
# header = {"user-agent":ua.random}
#
# response = requests.get(url,headers=header)
# print(response.headers)
# print(response.text)





#cookies

# url = "http://127.0.0.1:8000/cookie/"
# cookies = {
#     'sessionid':'7siqrisr3vryxzsh8uoitd7qrx0lp8fm'
# }
# response = requests.get(url,cookies= cookies)
# print(response.text)


#referer

url = "http://127.0.0.1:8000/referer"
ua = UserAgent()
print(ua.random)

header = {"user-agent":ua.random,"referer":"http://127.0.0.1:8000/"}

response = requests.get(url,headers=header,)
print(response.headers)
print(response.text)
